package org.listbeast.core.youtubeclient;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

public class tset {

	public static void main(String args[]) throws Exception {
		URL google = new URL("http://www.youtube.com/results?search_query=pantara+tar&aq=f/");
		BufferedReader in = new BufferedReader(new InputStreamReader(google.openStream()));

		String inputLine;
		String htmlData = "";
		while ((inputLine = in.readLine()) != null) {
			htmlData += inputLine;
		}
		

		htmlData = htmlData.replaceAll("(.*)(<span class=\"didyoumean\">.*</i></b></a>      </span>)(.*)", "$2");
		htmlData = htmlData.replaceAll("(.*<b><i>)(.*)(</i></b>.*)", "$2");
		
		System.out.println("poutsa: "+htmlData);

		in.close();
	}

}
